import React from 'react'
import styles from './index.module.less'
import './index.less'
import MdEditor from 'react-markdown-editor-lite'
import BackHomeBtn from '../../components/backHome'
import questionList from './questionList'
import MarkdownIt from 'markdown-it'

const mdParser = new MarkdownIt(/* Markdown-it options */)

const Interview = () => {
	return (
		<div className={styles.interview}>
			<div className={styles.btnBox}>
				<BackHomeBtn />
			</div>
			<div className={styles.questionBox}>
				{questionList.map((item, key) => {
					return (
						<div className={styles.questionItem} key={key}>
							<div className={styles.questionTitle}>{item.question}</div>
							<MdEditor
								key={key}
								value={item.answer}
								renderHTML={(text) => mdParser.render(text)}
								view={{
									html: true,
									menu: false,
									md: false,
								}}
							/>
						</div>
					)
				})}
			</div>
		</div>
	)
}

export default Interview
